package com.darren.archive.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component//表示这是一个组件类，写上这个注解，SpringBoot会在启动时加载它
//将所有app前缀的属性自动赋值给对应的Bean属性
@ConfigurationProperties(prefix = "app")
public class AppConfig {

    private String name;
    private String version;

    //app.page-size 中的中划线，代表第二个单词的第一个字母大写
    private Integer pageSize;

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
